<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title><%= title %></title>
    <link rel="stylesheet" href="/stylesheets/style.css" />
    <link
      rel="stylesheet"
      href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
      integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
      crossorigin="anonymous"
    />
  </head>
  <body>
    <nav class="navbar navbar-default">
      <div class="row flex-center">
        <div class="col-xs-12 col-md-8">
          <p class="navbar-brand"><%= title %>页</p>
        </div>
      </div>
    </nav>

    <% if(pageName === 'LOGIN') { %>
      <form class="form-inline" method="post" enctype="application/json" action="/login">
    <% } else { %>
      <form class="form-inline" method="post" enctype="application/json" action="/register">
    <% } %>
      <div class="form-group">
        <label for="nickname">昵称</label>
        <input
          type="text"
          class="form-control"
          name="nickname"
          id="InputName"
          placeholder="请输入你的昵称"
        />
      </div>
      <div class="form-group">
        <label for="password">密码</label>
        <input
          type="password"
          class="form-control"
          name="password"
          id="InputPassword"
          placeholder="****"
        />
      </div>
      <button type="submit" class="btn btn-default"><%= title %></button>
    </form>
  </body>
</html>
